package com.briup.jd2407cms.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.briup.jd2407cms.domain.Category;
import com.baomidou.mybatisplus.extension.service.IService;
import com.briup.jd2407cms.domain.extend.CategoryExtend;

import java.util.List;

/**
* @author jay
* @description 针对表【cms_category】的数据库操作Service
* @createDate 2024-11-18 14:40:14
*/
public interface CategoryService extends IService<Category> {
    List<CategoryExtend> selectAllParent();
    List<CategoryExtend> selectAllWithChild();
    IPage<Category> page(Integer pageNum, Integer pageSize, Integer parentId);
    void removeCategoryById(String id);
    void removeCategoryBatch(List<String> ids);
    List<Category> queryAllOneLevel();

    /**
     * insert batch
     * 将栏目批量导入数据库
     *
     * @param categories categories
     */
    void insertBatch(List<Category> categories);

    List<Category> getAll();
}
